#include "dialog.h"
#include "ui_dialog.h"

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
}

Dialog::~Dialog()
{
    delete ui;
}

bool Dialog::setCmListModel(QStringListModel * cmModel)
{
    if (ui->cmListView)
    {
        ui->cmListView->setModel(cmModel);
        return true;
    }

    return false;
}

bool Dialog::setGoalListModel(QStringListModel * goalModel)
{
    if (ui->goalListView)
    {
        ui->goalListView->setModel(goalModel);
        return true;
    }

    return false;
}

bool Dialog::setReceptorListModel(QStringListModel * receptorModel)
{
    if (ui->receptorListView)
    {
        ui->receptorListView->setModel(receptorModel);
        return true;
    }

    return false;
}

bool Dialog::appendOutputMsg(QString &msg)
{
    if(ui->outputText)
    {
        ui->outputText->append(msg);
        return true;
    }

    return false;
}
